namespace SharpTalk.Core.Services
{
    using System;
    using Base;
    using Diagnostic;

    /// <summary>
    /// 
    /// </summary>
    public sealed class UserService : Traceable
    { /// <summary>
        /// Obtain the system user single instance
        /// </summary>
        [field: NonSerialized]
        internal static readonly UserBase SystemUser = new SystemUser();

        /// <summary>
        /// Obtains the system user single instance
        /// </summary>
        public static UserBase GetSystemUser()
        {
            return SystemUser;
        }
        /// <summary>
        /// Obtains the system user single instance
        /// </summary>
        /// <typeparam name="T">Type to cast the instance to</typeparam>
        /// <returns></returns>
        public static T GetSystemUser<T>() where T : UserBase
        {
            return (T) SystemUser;
        }
    }
}